package com.outlook.flowervowlogin;

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;

public class CommandLimit implements Listener {
    @EventHandler
    public void onCommand(PlayerCommandPreprocessEvent e){
        Player p = e.getPlayer();
        if (e.getMessage().startsWith("/l")||e.getMessage().startsWith("/reg")||e.getMessage().startsWith("/captcha")){
            e.setCancelled(false);
        }else {
            e.setCancelled(true);
            p.sendMessage("§a[§a茶§b坂]§c指令错误!");
        }
    }
}
